class Xxk {
    constructor() {
        this.btn = $('.ul1 li')
        this.list = $('.ul2 li')
        this.init()
    }
    init() {
        this.look()
    }
    look() {
        for (let i = 0; i < this.btn.length; i++) {
            this.btn[i].onclick = () => {
                for (let j = 0; j < this.list.length; j++) {
                    this.list[j].style.display = 'none'
                    this.btn[j].className = '' 
                }
                this.list[i].style.display = 'block'
                this.btn[i].className = 'show' + i
            }
        }
    }
}

new Xxk()